/**
 * Created with IntelliJ IDEA.
 * Description:
 * Author:  LiuTao
 * Version: 1.0
 * Date:    2023-10-07  19:41
 */
public class Test {
    public static void main(String[] args) {
        Group group = new Group(100);
        group.addMember(new Member("崔铭轩", 18, "2240110410"));
        group.addMember(new Member("肖思辰", 20, "2240110430"));

        System.out.println("所有成员：");
        group.listAllMembers();

        System.out.println("根据姓名查找：");
        System.out.println(group.findMemberByName("崔铭轩"));

        System.out.println("根据学号查找：");
        System.out.println(group.findMemberId("2240110410"));

        group.updateMemberInfo("肖思辰", new Member("刘涛", 22, "2240110420"));
        System.out.println("更新后的成员信息：");
        group.listAllMembers();

        group.sortByAge();
        System.out.println("根据年龄排序：");
        group.listAllMembers();

        group.sortByName();
        System.out.println("根据姓名排序：");
        group.listAllMembers();

        group.deleteMember("崔铭轩");
        System.out.println("删除后的所有成员：");
        group.listAllMembers();

        System.out.println("总人数：" + group.totalMembers());
    }
}
